$(function()
{
	
	/*
	define a new language named "custom"
	*/

	$.dateRangePickerLanguages['custom'] = 
	{
		'selected': 'Choosed:',
		'days': 'Days',
		'apply': 'Close',
		'week-1' : 'Mon',
		'week-2' : 'Tue',
		'week-3' : 'Wed',
		'week-4' : 'Thu',
		'week-5' : 'Fri',
		'week-6' : 'Sat',
		'week-7' : 'Sun',
		'month-name': ['January','February','March','April','May','June','July','August','September','October','November','December'],
		'shortcuts' : 'Shortcuts',
		'past': 'Past',
		'7days' : '7days',
		'14days' : '14days',
		'30days' : '30days',
		'previous' : 'Previous',
		'prev-week' : 'Week',
		'prev-month' : 'Month',
		'prev-quarter' : 'Quarter',
		'prev-year' : 'Year',
		'less-than' : 'Date range should longer than %d days',
		'more-than' : 'Date range should less than %d days',
		'default-more' : 'Please select a date range longer than %d days',
		'default-less' : 'Please select a date range less than %d days',
		'default-range' : 'Please select a date range between %d and %d days',
		'default-default': 'This is costom language'
	};
	

	$('#two-inputs').dateRangePicker(
	{
		separator : ' to ',
		getValue: function()
		{
			if ($('#date-range200').val() && $('#date-range201').val() )
				return $('#date-range200').val() + ' to ' + $('#date-range201').val();
			else
				return '';
		},
		setValue: function(s,s1,s2)
		{
			$('#date-range200').val(s1);
			$('#date-range201').val(s2);
		}
	});
	
	$('#two-inputs-2').dateRangePicker(
	{
		separator : ' to ',
		getValue: function()
		{
			if ($('#date-range300').val() && $('#date-range301').val() )
				return $('#date-range200').val() + ' to ' + $('#date-range201').val();
			else
				return '';
		},
		setValue: function(s,s1,s2)
		{
			$('#date-range300').val(s1);
			$('#date-range301').val(s2);
		}
	});
	
	
	
	var start = {
				format: 'YYYY-MM-DD hh:mm:ss',
				minDate: '2014-06-16 23:59:59', //设定最小日期为当前日期
				festival: true,
				//isinitVal:true,
				maxDate: $.nowDate(0), //最大日期
				choosefun: function(elem, datas) {
					end.minDate = datas; //开始日选好后，重置结束日的最小日期
				}
			};
			var end = {
				format: 'YYYY年MM月DD日 hh:mm:ss',
				minDate: $.nowDate(0), //设定最小日期为当前日期
				festival: true,
				//isinitVal:true,
				maxDate: '2099-06-16 23:59:59', //最大日期
				choosefun: function(elem, datas) {
					start.maxDate = datas; //将结束日的初始值设定为开始日的最大日期
				}
			};
			$("#inpstart").jeDate(start);
			$("#inpend").jeDate(end);

			$("#date05").jeDate({
				isinitVal: true,
				festival: true,
				ishmsVal: false,
				minDate: '2016-06-16 23:59:59',
				maxDate: $.nowDate(0),
				format: "hh:mm:ss",
				zIndex: 3000,
			})
})